package com.ecommerce.dddmodules.infrastructure.db.entity;

import com.ecommerce.dddmodules.ordercontext.model.OrderItem;

public class MySqlOrderItem extends OrderItem {

	/**
	 * 订单Id
	 */
	private int orderId;
	/**
	 * 通过产品ID、数量、单价、单位重量
	 * 构造订单项目
	 *
	 * @param productId  产品ID
	 * @param quantity   数量
	 * @param unitPrice  单价
	 * @param unitWeight 单位重量
	 */
	public MySqlOrderItem(int productId, int quantity, float unitPrice, float unitWeight) {
		super(productId, quantity, unitPrice, unitWeight);
	}

	/**
	 * 设置订单ID
	 * @param orderId 订单ID
	 */
	public void setOrderId(int orderId) {
		this.orderId = orderId;
	}

	/**
	 * 获取订单ID
	 * @return 返回订单ID
	 */
	public int getOrderId() {
		return orderId;
	}
}
